package com.example.cmp;

import com.yomahub.liteflow.annotation.LiteflowComponent;
import com.yomahub.liteflow.annotation.LiteflowRetry;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.flow.LiteflowResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@LiteflowComponent("invoke")
@Slf4j
public class InvokeCmp extends NodeComponent {

    @Override
    public void process() throws Exception {
        String data = this.getCmpData(String.class);
        log.info("触发子流程:"+data);
        LiteflowResponse res = this.invoke2Resp(data,"隐式流程的初始参数，可为null");
        if(!res.isSuccess()){
            log.info("1111");
        }
    }
}
